package com.ruoyi.customerService.service.impl;

import com.github.pagehelper.PageHelper;
import com.ruoyi.customerService.domain.CsClaimsBillingRecords;
import com.ruoyi.customerService.domain.CsClaimsBillingRecordsCollect;
import com.ruoyi.customerService.domain.vo.CsClaimsBillingRecordsVo;
import com.ruoyi.customerService.mapper.CsClaimsBillingRecordsCollectMapper;
import com.ruoyi.customerService.mapper.CsClaimsBillingRecordsMapper;
import com.ruoyi.customerService.service.CsClaimsBillingRecordsService;
import com.ruoyi.logistic.domain.PageDate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CsClaimsBillingRecordsServiceImpl implements CsClaimsBillingRecordsService {
    @Autowired
    private CsClaimsBillingRecordsMapper csClaimsBillingRecordsMapper;
    @Autowired
    private CsClaimsBillingRecordsCollectMapper csClaimsBillingRecordsCollectMapper;
    @Override
    public List<CsClaimsBillingRecords> selectAll(PageDate pageDate) {
        PageHelper.startPage(pageDate);
        return csClaimsBillingRecordsMapper.selectAll();
    }

    @Override
    public Boolean insert(CsClaimsBillingRecords csClaimsBillingRecords) {
        return csClaimsBillingRecordsMapper.insert(csClaimsBillingRecords);
    }

    @Override
    public Boolean update(CsClaimsBillingRecords csClaimsBillingRecords) {
        return csClaimsBillingRecordsMapper.update(csClaimsBillingRecords);
    }

    @Override
    public Boolean deleteById(Integer id) {
        return csClaimsBillingRecordsMapper.deleteById(id);
    }

    @Override
    public List<CsClaimsBillingRecords> search(CsClaimsBillingRecordsVo vo) {
        PageHelper.startPage(vo.getPageDate());
       return csClaimsBillingRecordsMapper.search(vo);
    }

    @Override
    public List<CsClaimsBillingRecordsCollect> collect(CsClaimsBillingRecordsVo vo) {
        return csClaimsBillingRecordsCollectMapper.collect(vo);
    }
}
